<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>simple hello world</title>
        <script type="text/javascript">
            function doError() {
                throw new Error("error on click");
            }
        </script>
    </head>
    <body> <button onclick="doError()" style="position:absolute; top:10px; left:10px">do error</button>
    </body>
</html>